﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Kmust
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class Login : System.Windows.Window
    {
        public Login()
        {
            InitializeComponent();
            Kmust.Commom.KmustDate.init();
        }

        private void LoginButton_Click(object sender, RoutedEventArgs e)
        {
            //AccountService.AccountServiceClient sc = new AccountService.AccountServiceClient();
            //sc.SignInCompleted += sc_SignInCompleted;
            //sc.SignInAsync(UserNumber.Text.ToString(), UserPassword.Password.ToString(), "");
            this.Hide();
            MainWindow main = new MainWindow();
            main.Show();
            this.Close();
        }

        //void sc_SignInCompleted(object sender, AccountService.SignInCompletedEventArgs e)
        //{
        //   // throw new NotImplementedException();
        //    try
        //    {
        //        if (e.Result)
        //        {
        //            this.Hide();
        //            MainWindow main = new MainWindow();
        //            main.Show();
        //            this.Close();
        //        }
        //        else
        //        {
                  
        //        }
        //    }
        //    catch(Exception ex){

        //            MessageBox.Show(ex.ToString());
        //    }
        //}
    }
}
